<?php

use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

// Route::middleware('auth:api')->get('/user', function (Request $request) {
//     return $request->user();
// });
Route::group(['prefix' => 'v1', 'namespace' => 'Api\v1'], function ($route) {

    $route->group(['prefix'=>'face'], function ($route){

//        $route->group(['middleware' => ['JudgeApiKey', 'ApiKeyRequest']], function($route){
        $route->group(['middleware' => 'JudgeApiKey'], function($route){
            $route->post('detect', 'FaceController@faceDetect')->name('Face.detect');
            $route->post('emotion', 'FaceController@getEmotion')->name('Face.emotion');
            $route->post('landmarks', 'FaceController@getLandmarks')->name('Face.landmarks');
            $route->post('agegender', 'FaceController@getAgeGender')->name('Face.agegender');
            $route->post('texture_swap_3d', 'FaceController@textureSwap')->name('Face.texture_swap_3d');
            $route->post('swapface', 'FaceController@swapFace')->name('Face.swapface');
            $route->post('generate_3d_model', 'FaceController@generateModel')->name('Face.generate_3d_model');
            $route->post('makeupswap', 'FaceController@makeupSwap')->name('Face.makeupswap');
            $route->post('faceaging', 'FaceController@faceAging')->name('Face.faceaging');
            $route->post('detecthead', 'FaceController@detectHead')->name('Face.detecthead');
            $route->post('facecompare', 'FaceController@faceCompare')->name('Face.facecompare');
            $route->post('hairsegement', 'FaceController@hairSegement')->name('Face.hairsegement');
            $route->post('haircolor', 'FaceController@hairColor')->name('Face.haircolor');
            $route->post('beautyrank', 'FaceController@beautyRank')->name('Face.beautyrank');
            $route->post('skinclassify', 'FaceController@skinClassify')->name('Face.skinclassify');
        });
    });
});